package com.foreknow.mapping;

import com.foreknow.bean.Borrow_info_select;

import java.sql.ResultSet;
import java.sql.SQLException;

public class Borrow_info_selectMapping implements EntityMapping {
    @Override
    public Object mapping(ResultSet rs) throws SQLException {
        Borrow_info_select borrow_info = new Borrow_info_select();
        borrow_info.setId(rs.getInt("id"));
        borrow_info.setBook_name(rs.getString("book_name"));
        borrow_info.setStudent_name(rs.getString("student_name"));
        borrow_info.setStart_time(rs.getTimestamp("start_time"));
        borrow_info.setEnd_time(rs.getTimestamp("end_time"));
        return borrow_info;
    }
}
